package com.wudimeng.syll.dao;

import com.wudimeng.syll.entity.CRuKuXinXi;
import com.wudimeng.syll.entity.CRuKuXinXiShanChu;
import com.wudimeng.syll.entity.YongHuXinXi;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

//入库信息
@Repository
public interface ICRuKuXinXiDAO {

	//查询入库信息
	public List<Map<String,Object>> selectCRuKuXinXi(Map<String, String> paramMap);


	//查询入库流水号
	public List<Map<String,Object>> getRuKuLiuShuiHao(Map<String,String> map);

	//查询入库信息 LiuShuiHao
	public Map<String,Object> selectCRuKuXinXiByLiuShuiHao(@Param("LiuShuiHao")String LiuShuiHao,@Param("LiuShuiID")String LiuShuiID);

	//查询入库信息 LiuShuiHao
	CRuKuXinXi selectCRuKuXinXiByLiuShuiID(String LiuShuiID);

	//查询入库信息 liuShuiHao 追溯使用
	Map<String,String> findRuKuXinXiByLiuShuiHao(String liuShuiHao);

	//查询出库信息 liuShuiHao 追溯使用
	Map<String,String> findChuKuXinXiByLiuShuiHao(String liuShuiHao);

	//
	void addCRuKuXinXi(CRuKuXinXi cRuKuXinXi);

	void addCRuKuXinXiShanChu(CRuKuXinXi cRuKuXinXi);

	void updCRuKuXinXi(CRuKuXinXi cRuKuXinXi);

	void delCRuKuXinXi(String liuShuiID);

	//修改已销售数量 减库存
	void updCRuKuYiXiaoShouShuLiang(@Param("liuShuiHao") String liuShuiHao,@Param("shuLiang") BigDecimal shuLiang);

	//修改已销售数量 加库存
	void updCRuKuYiXiaoShouShuLiangADD(@Param("liuShuiHao") String liuShuiHao,@Param("shuLiang") BigDecimal shuLiang);


	String getLengKuXinXi(Integer lengKuId);

	//查询下游信息
	Map<String,Object> getRuKuXinXiByChuKuLiuShuiId(String chuKuLiuShuiId);

	//查询 审核信息
	int getRuKuXinXiShenHeByLiuShuiHao(String liuShuiHao);

}
